#pragma once
#include <memory>
#include <mutex>

//单例模式：懒汉;
class SingletonLhan
{
private:
    //私有化实例;
    static std::shared_ptr<SingletonLhan> m_pInstance;

    //私有化构造;
    SingletonLhan();

    //禁用拷贝构造和赋值重载
    SingletonLhan(const SingletonLhan& hs) = delete;
    SingletonLhan& operator=(const SingletonLhan& hs) = delete;
public:
    ~SingletonLhan();

    //获取实例;
    static std::shared_ptr<SingletonLhan> GetInstance();

    //测试函数;
    void Display();

public:
    static std::mutex m_pMtx;
};

